﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AsyncTestingDemo
{
    public interface IDoStuff
    {
        Task<string> LongRunningOperation();
    }

    public class SystemUnderTest
    {
        private IDoStuff helper;
        public SystemUnderTest(IDoStuff helper)
        {
            this.helper = helper;
        }

        public async Task<string> DoSomething()
        {
            var result = await helper.LongRunningOperation();
            return String.Format("Interface said '{0}'", result);
        }
    }
}
